package com.lhdx.practical.bean;

import com.lhdx.practical.utils.IDGenerator;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 分数管理实体
 */
@Entity
@Table(name="fraction")
public class Fraction {
    @Id
    private long id;
    private long mid;

    private long sid;
    /**
     * 小组ID
     */
    private long groupid;
    /**
     * 提交人
     */
    private long authorid;
    /**
     * 人员ID
     */
    private long personid;
    /**
     * 人员名称
     */
    private String personname;
    /**
     * 小组互评分数
     */
    private int scoring;
    /**
     * 老师评分
     */
    private double teacherscore = 0;

    public Fraction(){};

    public Fraction(long id,long mid,long sid,long groupid,long authorid,long personid,String personname,int scoring){
        if(id == 0){
            this.id = IDGenerator.getID();
        }
        this.mid = mid;
        this.sid = sid;
        this.groupid = groupid;
        this.authorid = authorid;
        this.personid = personid;
        this.personname = personname;
        this.scoring = scoring;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public long getGroupid() {
        return groupid;
    }

    public void setGroupid(long groupid) {
        this.groupid = groupid;
    }

    public long getPersonid() {
        return personid;
    }

    public void setPersonid(long personid) {
        this.personid = personid;
    }

    public String getPersonname() {
        return personname;
    }

    public void setPersonname(String personname) {
        this.personname = personname;
    }

    public int getScoring() {
        return scoring;
    }

    public void setScoring(int scoring) {
        this.scoring = scoring;
    }

    public long getAuthorid() {
        return authorid;
    }

    public void setAuthorid(long authorid) {
        this.authorid = authorid;
    }

    public long getMid() {
        return mid;
    }

    public void setMid(long mid) {
        this.mid = mid;
    }

    public long getSid() {
        return sid;
    }

    public void setSid(long sid) {
        this.sid = sid;
    }

    public double getTeacherscore() {
        return teacherscore;
    }

    public void setTeacherscore(double teacherscore) {
        this.teacherscore = teacherscore;
    }
}
